#include "udpserver.hpp"
#include <memory>
#include <cstdio>

void Usage(string str)
{
    cout<<"[ "<<str<<" serverport:1024+"<<"]"<<endl;
}

int main(int agrc,char* agrv[])
{
    if(agrc!=2)
    {
        Usage(agrv[0]);
        exit(1);
    }

    uint16_t port=stoi(agrv[1]);
    unique_ptr<Server> svr(new Server(port));

    svr->Init();
    svr->Run();
    return 0;
}